import request from '@/utils/request'

// 分类-查询列表（分页）
export function categorizePageList(query) {
  return request({
    url: '/system/handleApp/categorize/pageList',
    method: 'get',
    loading: true,
    params: query
  })
}

// 分类-新增
export function categorizeAdd(data) {
  return request({
    url: '/system/handleApp/categorize',
    method: 'post',
    loading: true,
    data: data
  })
}

// 分类-修改
export function categorizeEdit(data) {
  return request({
    url: '/system/handleApp/categorize',
    method: 'put',
    loading: true,
    data: data
  })
}

// 分类-详情
export function getCategorizeInfo(id) {
  return request({
    url: '/system/handleApp/categorize/' + id,
    method: 'get',
    loading: true
  })
}

// 分类-删除
export function removeCategorize(id) {
  return request({
    url: '/system/handleApp/categorize/' + id,
    method: 'delete',
    loading: true
  })
}

// 分类-查询列表所有
export function optionSelect() {
  return request({
    url: '/system/handleApp/categorize/optionSelect',
    method: 'get',
    loading: true
  })
}

// 分类-查询列表（分页）
export function pageList(query) {
  return request({
    url: '/system/handleApp/pageList',
    method: 'get',
    loading: true,
    params: query
  })
}

// 新增
export function add(data) {
  return request({
    url: '/system/handleApp',
    method: 'post',
    loading: true,
    data: data
  })
}

// 修改
export function edit(data) {
  return request({
    url: '/system/handleApp',
    method: 'put',
    loading: true,
    data: data
  })
}

// 详情
export function getInfo(id) {
  return request({
    url: '/system/handleApp/' + id,
    method: 'get',
    loading: true
  })
}

// 删除
export function remove(id) {
  return request({
    url: '/system/handleApp/' + id,
    method: 'delete',
    loading: true
  })
}
